(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



(* ::Input::Initialization:: *)
SetDirectory["C:\\drorbn\\AcademicPensieve\\Projects\\SL2Portfolio"];
<< KnotTheory`
<< "SL2PortfolioProgram.m"


(* ::Input::Initialization:: *)
OverbayP2Data=Get["C:\\drorbn\\AcademicPensieve\\People\\Overbay\\OverbayP2Data.m"];


(* ::Input::Initialization:: *)
$p=5; $k=2; $U=QU;


(* ::Input::Initialization:: *)
SC\[Theta][p_]:=Collect[ C\[Theta]@Subscript[\[DoubleStruckCapitalO], CU][{y,a,x} ,p]/. {CU->Times, \[Gamma]|\[HBar]->1}, \[Epsilon], Simplify];
SQ\[Theta][p_]:=Collect[ Q\[Theta]@Subscript[\[DoubleStruckCapitalO], QU][{y,a,x} ,p]/. {QU->Times, \[Gamma]|\[HBar]->1}, \[Epsilon], Simplify];


(* ::Input::Initialization:: *)
Subscript[\[DoubleStruckCapitalE][L_,Q_,P_], $k_]:=\[DoubleStruckCapitalE][L,Q,Series[Normal@P,{\[Epsilon],0,$k}]];
Subscript[Subscript[\[DoubleStruckCapitalE], d_->r_][L_,Q_,P_], $k_]:=Subscript[\[DoubleStruckCapitalE], d->r]@@Subscript[\[DoubleStruckCapitalE][L,Q,P], $k];
\[DoubleStruckCapitalE]3@\[DoubleStruckCapitalE][\[Omega]_,L_,Q_,Ps_]:=CF/@Subscript[\[DoubleStruckCapitalE][L,\[Omega]^-1 Q,\[Omega]^-1 (\[Omega]^-4 \[Epsilon])^(-1+Range@Length@Ps).Ps], $k];
\[DoubleStruckCapitalE]4@\[DoubleStruckCapitalE][L_,Q_,P_]:=Module[
{\[Omega]=Normal[P]^-1/.\[Epsilon]->0,Ps=CoefficientList[P,\[Epsilon]]},
CF/@\[DoubleStruckCapitalE][\[Omega],L,\[Omega] Q,\[Omega]^(-3+4Range@Length@Ps) Ps]];
\[DoubleStruckCapitalE]3@Subscript[\[DoubleStruckCapitalE], sp___][as___]:=\[DoubleStruckCapitalE]3@\[DoubleStruckCapitalE][as]/.\[DoubleStruckCapitalE]->Subscript[\[DoubleStruckCapitalE], sp];
\[DoubleStruckCapitalE]4@Subscript[\[DoubleStruckCapitalE], sp___][as___]:=\[DoubleStruckCapitalE]4@\[DoubleStruckCapitalE][as]/.\[DoubleStruckCapitalE]->Subscript[\[DoubleStruckCapitalE], sp];


(* ::Input::Initialization:: *)
P[Knot[n_,k_]] := P[Knot[n,k]]=Module[{fname},
fname="../SL2Invariant/k=2/Data/"<>ToString[n]<>"_"<>ToString[k]<>".m";
Collect[\[DoubleStruckCapitalE]3[Get[fname][[2,2]]][[3]] // Normal, \[Epsilon], Simplify]
];
QP[K_Knot]:=QP[K]=CF@P[K];


(* ::Input::Initialization:: *)
H[p_]:=If[TrueQ@Simplify[p==(p/.T->1/T)],\[Sigma]@@CoefficientList[Expand@Together[p]/.T^n_/;n<0:>0,T], p];



